<template>
  <el-dialog :model-value="modelValue" title="菜单权限分配" @update:model-value="fn1"></el-dialog>
</template>

<script setup lang="ts">
import { ref } from 'vue'

defineProps<{
  modelValue: boolean
}>()

const emit = defineEmits(['update:model-value'])

function fn1() {
  console.log('fn1')
  // 触发我的 update:model-value 这个事件
  emit('update:model-value', false)
}
</script>
